<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('划拨记录列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>终端号：</label>
                                <input type="text" name="posNo"/>
                            </li>
                            <li>
                                <label style="width: 80px;">划拨前服务商：</label>
                                <input type="number" name="currentAgent"/>
                            </li>
                            <li>
                                <label style="width: 80px">划拨后服务商：</label>
                                <input type="number" name="targetAgent"/>
                            </li>
                          <!--  <li>
                                <label>操作日期：</label>
                                <input type="text" name="operateDate"/>
                            </li>-->
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="transfer()" shiro:hasPermission="formalPos:posTransferRecord:add">
                    <i class="fa fa-plus"></i> 终端划拨
                </a>

            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('formalPos:posTransferRecord:edit')}]];
        var removeFlag = [[${@permission.hasPermi('formalPos:posTransferRecord:remove')}]];
        var prefix = ctx + "formalPos/posTransferRecord";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "划拨记录",
                columns: [
                {
                    field: 'id',
                    title: '主键',
                    visible: false
                },
                {
                    field: 'posNo',
                    title: '终端号'
                },
                {
                    field: 'currentAgent',
                    title: '当前服务商'
                },
                {
                    field: 'targetAgent',
                    title: '目标服务商'
                },
                {
                    field: 'operateDate',
                    title: '操作日期'
                },
                {
                    field: 'operateTime',
                    title: '操作时间'
                },
                {
                    field: 'operateMan',
                    title: '操作人'
                },]
            };
            $.table.init(options);
        });

        function transfer() {
            $.modal.open("终端划拨",prefix + "/transfer",'1000');
        }
    </script>
</body>
</html>